<template>
  <div>
     <div>
        <form @submit.prevent = 'submit'>
            
        <input type="text" name="username" v-model.trim.lazy = 'form.username'> <br/><br/>

        <input type="text" name="password" v-model.number.lazy = 'form.password'><br/><br/>

        <button>提交</button>
    </form>
     </div>
   </div>
</template>
 
<script>
export default {
  data() {
    return {
        msg:'杭州的第一场雪',

        form:{
            username:'',
            password:''
        }
    };
  },
  methods: {
    submit() {
        console.log(this.form.username);
        console.log(this.form.password);

    }
  }
};
</script>

<style scoped>
     
</style>